# -*- coding: gbk -*-

import hall

def do_search (item):
	params = {}
	for key, value in item[3]:
		params[key.upper()] = value
	if 'FROM' in params and 'kangbo@baidu.com' in params['FROM']:
		print item[0], params['SUBJECT']

for i in range(50000, 80000):
	if i % 1000 == 0:
		print i
	do_search(hall.contentMan.getMessage(i))
